class CostLevelModel {
  String? title;
  int? isDisable;
  String? remark;
  List<CostLevelItem>? items;
  bool isShow = false;
  CostLevelModel({title, isDisable, remark, items, isShow});

  CostLevelModel.fromJson(Map<String, dynamic> json) {
    title = json['title'];
    isDisable = json['is_disable'];
    remark = json['remark'];
    if (json['items'] != null) {
      items = <CostLevelItem>[];
      json['items'].forEach((v) {
        items!.add(CostLevelItem.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['title'] = title;
    data['is_disable'] = isDisable;
    data['remark'] = remark;
    if (items != null) {
      data['items'] = items!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class CostLevelItem {
  int? levelId;
  int? price;
  int? vipPrice;
  int? svipPrice;
  int? isCurrentLevel;
  int? level;

  CostLevelItem({levelId, price, vipPrice, svipPrice, isCurrentLevel, level});

  CostLevelItem.fromJson(Map<String, dynamic> json) {
    levelId = json['level_id'];
    price = json['price'];
    vipPrice = json['vip_price'];
    svipPrice = json['svip_price'];
    isCurrentLevel = json['is_current_level'];
    level = json['level'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['level_id'] = levelId;
    data['price'] = price;
    data['vip_price'] = vipPrice;
    data['svip_price'] = svipPrice;
    data['is_current_level'] = isCurrentLevel;
    data['level'] = level;
    return data;
  }
}
